/*
 * Copyright (c) 2024. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package com.neusoft.npi.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("sysinfo")
public class Sysinfo {
    @TableId(value = "sysid", type = IdType.AUTO)
    private Integer sysid; //    int auto_increment comment '系统功能节点编号'

    private String title; //     varchar(20) default '默认名称'  null comment '节点名称',
    private Integer parentid; // int         default 1           null comment '父节点编号',
    private String path; //   varchar(50)                     null comment '目标组件的路由',
    private Integer nbl; //  tinyint     default 1           not null comment '记录状态',
    private String icon; //   varchar(10) default 'Promotion' null comment '图标的名字'

    // 在MybatisPlus自动生成SQL过程中，排除掉children字段
    @TableField(exist = false)
    private List<Sysinfo> children = new ArrayList<>();
}
